xen_smp_intr_init(0);
- for_each_cpu_mask (cpu, cpu_possible_map) {
+ /* Restrict the possible_map according to max_cpus. */
+ while ((num_possible_cpus() > 1) && (num_possible_cpus() > max_cpus)) {
+ for (cpu = NR_CPUS-1; !cpu_isset(cpu, cpu_possible_map); cpu--)
+ continue;
+ cpu_clear(cpu, cpu_possible_map);
+ }
+
+ for_each_cpu (cpu) {
if (cpu == 0)
continue;
#endif
gdt_descr->address = get_zeroed_page(GFP_KERNEL);
if (unlikely(!gdt_descr->address)) {
- printk(KERN_CRIT "CPU%d failed to allocate GDT\n", cpu);
+ printk(KERN_CRIT "CPU%d failed to allocate GDT\n",
+ cpu);
continue;
}
gdt_descr->size = GDT_SIZE;
init_xenbus_allowed_cpumask();
- /* Currently, Xen gives no dynamic NUMA/HT info. */
- for (cpu = 1; cpu < NR_CPUS; cpu++) {
- cpu_sibling_map[cpu] = cpumask_of_cpu(cpu);
- cpu_core_map[cpu] = cpumask_of_cpu(cpu);
- }
-
#ifdef CONFIG_X86_IO_APIC
/*
* Here we can be sure that there is an IO-APIC in the system. Let's